package system;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class Leave {

    public void leave() {
        JFrame frame = new JFrame("请假申请界面");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(500, 400);

        JPanel panel = new JPanel();

        JLabel reasonLabel = new JLabel("请假原因：");
        JTextField reasonTextField = new JTextField();

        JLabel startDateLabel = new JLabel("开始时间：");
        JTextField startDateTextField = new JTextField();

        JLabel endDateLabel = new JLabel("结束时间：");
        JTextField endDateTextField = new JTextField();

        panel.add(reasonLabel);
        panel.add(reasonTextField);
        panel.add(startDateLabel);
        panel.add(startDateTextField);
        panel.add(endDateLabel);
        panel.add(endDateTextField);

        frame.add(panel);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        Leave interfaceObj = new Leave();
        interfaceObj.leave();
    }
}
